import request from '../utils/request'

export const getRole = () => {
  return request({
    url: "/role/getRole",
    method: "get",
  })
}

export const queryRoleList= (current,size,roleBo) => {
  return request({
    url: "/role/pageOfRole",
    method: 'post',
    params: {
      current,
      size
    },
    data: roleBo
  })
}

export const changeRoleStatus = (roleBo) => {
  return request({
    url: "/role/changeRoleStatus",
    method: "post",
    data: roleBo
  })
}

export const multiChangeRoleStatus = (roleStatusBos) => {
  return request({
    url: "/role/multiChangeRoleStatus",
    method: "post",
    data: roleStatusBos
  })
}

export const multiDelRole = (idArray) => {
  return request({
    url: "/role/multiDelRole",
    method: "post",
    data: idArray
  })
}

export const menuTree = () => {
  return request({
    url: "/menu/menuTree",
    method: "get",
  })
}

export const getRoleMenu = (id) => {
  return request({
    url: "/menu/getRoleMenu",
    method: "get",
    params: {
      id: id
    }
  })
}

